//
//  ContentViewController.m
//  SuperAPP
//
//  Created by Apple on 2019/5/7.
//  Copyright © 2019 ZhuKK. All rights reserved.
//

#import "ContentViewController.h"
#import "MBProgressHUD.h"
@interface ContentViewController ()<UIWebViewDelegate>
@property(nonatomic,strong)UIWebView *webView;
@property(nonatomic,strong)MBProgressHUD *hud;
@end

@implementation ContentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
    self.view.backgroundColor = [UIColor whiteColor];
    self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, StatusBarHeight, self.view.frame.size.width, self.view.frame.size.height-StatusBarHeight)];
    self.webView.delegate = self;
    [self.view addSubview:self.webView];
    
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.address]]];
}


-(void)webViewDidStartLoad:(UIWebView *)webView{
    self.hud = [MBProgressHUD showHUDAddedTo:self.webView animated:YES];
    self.hud.labelText = @"加载中...";
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
    [self.hud hide:YES];
}

@end

